{ stdenv, fetchgit, wlroots, wayland-protocols, wayland, meson, ninja, cmake, pkgconfig, pixman, libxkbcommon, libudev, libGL, xorg }:

stdenv.mkDerivation {
  pname = "wltrunk";
  version = "2019-11-27";

  src = fetchgit {
    url = "https://git.sr.ht/~bl4ckb0ne/wltrunk";
    rev = "5a234d3360b50764172e074ef969e40e600075c3";
    sha256 = "1mvgchwppi2vrj25bgng3psyr0jkbah2419lp4hyqj6drb5r0l6q";
  };

  nativeBuildInputs = [ meson ninja pkgconfig cmake ];
  buildInputs = [ wlroots wayland-protocols wayland pixman libxkbcommon libudev libGL xorg.libX11 ];

  meta = with stdenv.lib; {
    homepage = "https://git.sr.ht/~bl4ckb0ne/wltrunk";
    description = "High-level Wayland compositor library based on wlroots";
    license = licenses.gpl3;
    # maintainers =
  };
}
